package com.example.foods.domain;

import lombok.*;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.*;

@Data
public class AdminInfo {

    //@NotNull //要求当前属性的值不能为null值
    @NotBlank //要求当前属性的值不能为null值,也不能为空串
    //@NotEmpty //要求当前属性的值不能为null值,集合中元素个数要大于0
    @Length(min = 2,max=50)
    private String adminAccount;

    @NotBlank
    @Length(min = 2,max=50)
    private String adminPwd;

    @NotBlank
    @Pattern(regexp = "^[A-Za-z0-9]{4}$")
    private String code;

    private Integer adminId;
    private String realName,mobile;
}
